// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .CS}

//-------------MAIN---------------
thread 'RCMIN' 
 
0A95: enable_thread_saving 

:RCMIN_36E
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
jf @RCMIN_36E 
Model.Load(#RCGOBLIN)
038B: load_requested_models 
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 1.0 3.0 13.0 
02C1: store_to 1@ 2@ 3@ car_path_coords_closest_to 1@ 2@ 3@ 
4@ = Car.Create(#RCGOBLIN, 1@, 2@, 3@)
Car.SetImmunities(4@, 1, 1, 1, 1, 1)
Model.Destroy(#RCGOBLIN)
5@ = Marker.CreateAboveCar(4@)
Marker.SetColor(5@, 2555903)
0825: set_helicopter 4@ instant_rotor_start 
07BB: set_heli 4@ horizontal_thrust_power 8 
04DF: set_heli 4@ lean_and_thrust_limiter 0 
04A2: set_heli 4@ fly_to 1@ 2@ 3@ altitude_between 7.0 and 14.0 
0825: set_helicopter 4@ instant_rotor_start 
0726: heli 4@ follow_actor $PLAYER_ACTOR follow_car -1 radius 10.0 
07BB: set_heli 4@ horizontal_thrust_power 6 

:RCMIN_437
wait 0 
0407: store_coords_to 15@ 16@ 17@ from_car 4@ with_offset 0.0 0.0 -0.2 
0A3E: unknown_get_actor_in_sphere 15@ 16@ 17@ radius 200.6 200.6 200.0 handle_as 11@ 
0AE1: 11@ = random_actor_near_point 15@ 16@ 17@ in_radius 1000.0 find_next 1 pass_deads 1 //IF and SET 
if 
   not 11@ == -1 
jf @RCMIN_49E 

:RCMIN_49E
if 
   not 11@ == -1 
jf @RCMIN_5F0 
if 
   not Actor.Dead(11@)
jf @RCMIN_55B 
//Actor.RemoveReferences(11@)
0208: 17@ = random_float_in_ranges -0.2 0.2 
0407: store_coords_to 1@ 2@ 3@ from_car 4@ with_offset 0.0 0.0 -0.2 
04C4: store_coords_to 13@ 14@ 15@ from_actor 11@ with_offset 17@ 17@ 17@ 
0209: 16@ = random_int_in_ranges 25 55 
wait 16@ 
0209: 16@ = random_int_in_ranges 8 13 
097A: play_audio_at 1@ 2@ 3@ event 1157 
09E5: create_flash_light_at 1@ 2@ 3@ RGB_mask 255 0 0 radius 20.0 
06BC: create_M4_shoot_from 1@ 2@ 3@ target 13@ 14@ 15@ energy 16@ 

:RCMIN_55B
0AF0: 0@ = get_int_from_ini_file "CLEO\POZIT.INI" section "MP3" key "KEY" 
if or
  0@ == 1 
   Actor.Dead($PLAYER_ACTOR)
0741:   actor $PLAYER_ACTOR busted 
  $ONMISSION == 1 
jf @RCMIN_5AE 
Marker.Disable(5@)
Car.RemoveReferences(4@)
Car.Destroy(4@)
end_thread 

:RCMIN_5AE
if or
8203:   not actor $PLAYER_ACTOR near_car 4@ radius 50.0 60.0 flag 0 on_foot 
8204:   not actor $PLAYER_ACTOR near_car 4@ radius 76.0 75.0 sphere 0 in_car 
jf @RCMIN_5F0 
0726: heli 4@ follow_actor $PLAYER_ACTOR follow_car -1 radius 10.0 

:RCMIN_5F0
jf @RCMIN_437 
jump @RCMIN_437 